import * as userType from './action-type';

interface ISetUser{
    key?:string,
    type:string,
    value:any
}

export const userInfo = (state:any,action:ISetUser) =>{
    switch (action.type) {
        case userType.SETUSERINFO:
            return {...action.value};
        default:
            return state || null;
    }
}